package win.urls.shorten.web.controller.restful;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

import win.urls.shorten.entity.Template;
import win.urls.shorten.service.TemplateService;

@RestController
public class TemplateController {
	
	@Autowired
	private TemplateService templateService;
	
	@RequestMapping(value = "template", method = RequestMethod.GET)
	public Template getTemplate(){
		Template template = templateService.getName(1);
		System.out.println(template);
		return template;
	}
}
